import java.util.Arrays;

public class J2411073 {
    public static void main(String[] args) {
//        Alg alg = new Alg();
        Integer[] arrays = {10,20,50,8,35};
        Integer val = Alg.FindMax(arrays);
        System.out.println(val);
    }
}
class Alg{
    public static  <T extends Comparable>T FindMax(T[] array){
        T max = array[0];
        for (int i = 0; i < array.length; i++) {
            if(array[i].compareTo(max) > 0){
                max = array[i];
            }
        }
        return max;
    }
}

